import axios from "@/libs/request";

const getTableData = () => {
  return axios.request({
    url: "get_table_data",
    method: "get",
  });
};

const getDragList = () => {
  return axios.request({
    url: "get_drag_list",
    method: "get",
  });
};

const errorReq = () => {
  return axios.request({
    url: "error_url",
    method: "post",
  });
};

const saveErrorLogger = (info) => {
  return axios.request({
    url: "save_error_logger",
    data: info,
    method: "post",
  });
};

const uploadImg = (formData) => {
  return axios.request({
    url: "image/upload",
    data: formData,
  });
};

const getOrgData = () => {
  return axios.request({
    url: "get_org_data",
    method: "get",
  });
};

const getTreeSelectData = () => {
  return axios.request({
    url: "get_tree_select_data",
    method: "get",
  });
};

const getCaptcha = (sid) => {
  return axios.request({
    url: "public/getCaptcha",
    method: "get",
    params: sid,
  });
};
export {
  getTreeSelectData,
  getOrgData,
  uploadImg,
  saveErrorLogger,
  errorReq,
  getDragList,
  getTableData,
  getCaptcha,
};
